{{ $site := site }}
{{ $category := selectList "category" "" 1 20 "* FROM category WHERE status=1 order by sortNo desc" }}

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">




<link rel="apple-touch-icon" sizes="180x180" href="{{basePath}}{{ $site.Favicon }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{basePath}}{{ $site.Favicon }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{basePath}}{{ $site.Favicon }}">
<link rel="manifest" href="{{basePath}}js/manifest.json">
<link rel="mask-icon" href="{{basePath}}{{ $site.Favicon }}" color="#5bbad5">

<link rel="stylesheet" href="{{basePath}}css/even.css">
<link rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css">


<!--[if lte IE 9]>
  <script src="https://cdn.staticfile.org/classlist/1.2.20180112/classList.min.js"></script>
<![endif]-->

<!--[if lt IE 9]>
  <script src="https://cdn.staticfile.org/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

</head>
<body>
	<div id="mobile-navbar" class="mobile-navbar">
		<div class="mobile-header">
			<div class="mobile-navbar-icon">
				<span></span>
				<span></span>
				<span></span>
			</div>
			<div class="mobile-header-logo">
				<a href="{{basePath}}" class="logo">{{ $site.Name }}</a>
			</div>
			<div class="search-box">
				<input type="text" placeholder="查询内容..." id="input-phone" />
			</div>
		</div>
	</div>
	<nav id="mobile-menu" class="mobile-menu slideout-menu">
		<ul class="mobile-menu-list">
			<a href="{{basePath}}">
				<li class="mobile-menu-item">Home</li>
			</a>

			{{ range $k,$v := $category.Data }}
			  {{if $v.HrefURL}}
			    <a href="{{ hrefURL $v.HrefURL }}">
			  {{else}}
			    <a href="{{basePath}}category/{{ $v.Id }}">
			  {{end}}
				<li class="mobile-menu-item">{{ $v.Name }}</li>
			</a>

			{{ end }}

		</ul>
	</nav>
	<div class="container" id="mobile-panel">
		<header id="header" class="header">
			<div class="logo-wrapper">
				<a href="{{basePath}}" class="logo">{{ $site.Name }}</a>
			</div>

			<nav class="site-navbar">
				<ul id="menu" class="menu">
					<li class="menu-item">
						<a class="menu-item-link" href="{{basePath}}">Home</a>
					</li>
					{{ range $k,$v := $category.Data }}
					<li class="menu-item">
					  {{if $v.HrefURL}}
					     <a class="menu-item-link" href="{{ hrefURL $v.HrefURL }}">{{ $v.Name }}</a>
					  {{else}}
					     <a class="menu-item-link" href="{{basePath}}category/{{ $v.Id }}">{{ $v.Name }}</a>
					  {{end}}
					</li>
					{{ end }}
				</ul>
			</nav>
			<div class="search-box">
				<input type="text" placeholder="查询内容..." id="input-enter" />
			</div>
		</header>

		<main id="main" class="main">
			<div class="content-wrapper">
				<div id="content" class="content">

<script type="text/javascript" src="https://cdn.staticfile.org/jquery/3.7.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$('#input-enter').val($('#search-q').val())
	$('#input-phone').val($('#search-q').val())

	$('#input-enter').keypress(function(e){
		if(e.which == 13){
			// 回车键开始执行搜索查询
			let key = $('#input-enter').val()
			window.location.href="{{basePath}}?q="+key
		}		
	})

	$('#input-phone').keypress(function(e){
		if(e.which == 13){
			// 回车键开始执行搜索查询
			let key = $('#input-phone').val()
			window.location.href="{{basePath}}?q="+key
		}
	})

})

</script>